package com.yushu.authority.mapper;


import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.yushu.common.util.pager.Pages;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.Map;
import java.util.List;
import com.yushu.authority.pojo.vo.PmUserVO;
import com.yushu.authority.pojo.bo.PmUser;

/**
 * 
 * @author test
 * @CreateDate 2020-12-03 15:47:24
 */
public interface PmUserMapper  extends BaseMapper<PmUser>{
    List<PmUserVO> selectPageList(Pages page, @Param("ew") EntityWrapper<PmUserVO> wrapper);
    PmUserVO queryPmUserByKey(@Param("id") String id);
    int queryCountByName(@Param("map") Map map);

    int queryRoleCountOnUsers(@Param("list")List<PmUser> pmUsers);
    
    
    //查询邮箱是否存在
    int queryEmail(String userEmail);

	//修改密码
    int changePassword(PmUserVO pmUserVO);
    
 	//验证旧密码
    PmUser queryoldPassword(String oldPassword,String key);

    PmUser wUserEmail(String userEmail);

    //修改忘记密码
    boolean changeForgetPassword(PmUserVO pmUserVO);

    //用户名
    PmUser validateUserName(PmUser pmUser);

    //往菜单和用户表里添加一条记录
    void insertUserAndRole(Map map);
    
}
